<?php

namespace plugin\ycMassage\app\admin\validate;

use think\Validate;


class MassageAds extends Validate
{
    protected $rule =   [
        'position'            => 'require',
        'image'            => 'require',
        'url'             => 'requireIf:page,CUSTOM',
        'alias_id'         => 'requireIf:page,ARTICLE',
    ];

    protected $message  =   [
        'position.require'            => '广告位置不正确',
        'image.require'            => '请上传图片',
        'url.requireIf'             => '请填写链接',
        'alias_id.requireIf'         => '请选择文章',
    ];
}
